/*
Copyright 2010-2011 CumulusCloud
http://cumuluscloud.cc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cumulusCloud.common;

import cumulusCloud.knowledge.PathKnow;

/**
 * This class gives the useful path to know by all the webapps
 * 
 * @author Simon Levesque
 *
 */
public class InformationPath {
	static private PathKnow know = PathKnow.getInstance();
	
	/**
	 * To get the Tomcat configuration directory. Not useful unless you plan on
	 * creating a server configuration application.
	 * 
	 * @return The path of the Tomcat configuration directory
	 */
	public static String getCatalinaConfigPath() {
		return know.getCatalinaConfigPath();
	}
	
	/**
	 * To get the directory where the application must put their persistent data.
	 * 
	 * @param appName The application's name that will be appended to the path. Always use the name of your context.
	 * @return The application's data directory
	 */
	public static String getCloudAppsDataPath(String appName) {
		return know.getCloudAppsDataPath(appName);
	}
	
	/**
	 * To get the directory where all the applications are deployed.
	 * 
	 * @return The directory where all the applications are deployed
	 */
	public static String getCloudAppsInstallPath() {
		return know.getCloudAppsInstallPath();
	}
	
	/**
	 * To get the directory where the common configurations are. Should be used only by the Core applications.
	 * 
	 * @return The directory where the common configurations are
	 */
	public static String getCloudGlobalConfigPath() {
		return know.getCloudGlobalConfigPath();
	}
	
	/**
	 * To get the directory of the Java binary files.
	 * 
	 * @return The directory of the Java binary files
	 */
	public static String getJavaBinPath() {
		return know.getJavaBinPath();
	}
}
